unit oFrameFL;

{
	created   26.3.2010
	author   	Miroslav Mintal
	purpose
}


interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, StdCtrls, ExtCtrls, oManager, oProcessItem, oProcessObjects,
  oProcessObjectConstants;

type
  TFrameFL = class(TFrame)
    btnSave: TButton;
    btnCancel: TButton;
    gbxLayerSettings: TGroupBox;
    leSectorCount: TLabeledEdit;
    leLevelSize: TLabeledEdit;
    leCellSize: TLabeledEdit;
    txtName: TLabeledEdit;
    procedure btnSaveClick(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
    procedure leLevelSizeChange(Sender: TObject);
  private
    aManager: TManager;
    aEditing : boolean;
    { Private declarations }
  public
    Success : boolean;
    property Manager: TManager read aManager write aManager;
    property Editing : boolean read aEditing write aEditing;
    { Public declarations }
  end;

implementation

{$R *.dfm}

procedure TFrameFL.btnCancelClick(Sender: TObject);
var
  j : integer;
begin
  aManager.ProcessObject(TProcessItem.create(PO_EDITOR_FL_CANCEL, nil));
end;

procedure TFrameFL.btnSaveClick(Sender: TObject);
begin
  aManager.ProcessObject(TProcessItem.create(PO_EDITOR_FL_SAVE, nil));
  Success := true;
end;

procedure TFrameFL.leLevelSizeChange(Sender: TObject);
begin
  aManager.ProcessObject(TProcessItem.create(PO_EDITOR_FL_CHANGE_LEVEL_SIZE, nil));
end;

end.
